const webpack = require('webpack');
const path = require('path');
var packURL = path.join(__dirname, "", "out");
module.exports = {
	devtool: 'source-map', //配置生成Source Maps，选择合适的选项
	context: __dirname + "", // 设置webpack配置中指向的默认目录为项目根目录
	entry: {
		test: './js/main.js',
	},
	output: {
		path: packURL + "/", //打包后的文件存放的地方
		filename: "main.all.js", //打包后输出文件的文件名
	},
	resolve: {
		alias: {
		}
	}
};

//new webpack.optimize.UglifyJsPlugin({ //压缩代码
//			compress: {
//				warnings: false
//			},
//			except: ['$super', '$', 'exports', 'require'] //排除关键字
//		})